/*
 *
 * *******************************************************************
 *   @项目名称: BHex Android
 *   @文件名称: QuoteTokensBean.java
 *   @Date: 11/29/18 3:21 PM
 *   @Author: chenjun
 *   @Copyright（C）: 2018 BlueHelix Inc.   All rights reserved.
 *   注意：本内容仅限于内部传阅，禁止外泄以及用于其他的商业目的.
 *  *******************************************************************
 *
 */

package io.bhex.sdk.quote.bean;

import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.List;

import io.bhex.baselib.network.response.BaseResponse;
import io.bhex.sdk.account.UserInfo;



public class QuoteTokensBean extends BaseResponse {

    private List<TokenItem> array;

    public List<TokenItem> getArray() {
        return array;
    }

    public void setArray(List<TokenItem> array) {
        this.array = array;
    }

    public static class TokenItem implements Serializable{
        /**
         * token : XEM
         * tokenFullName : NEM
         */

        private String tokenFullName;  //local 币币本地新增字段
        private String firstLetter;
        private String tabName; //tab显示名称

        private LinkedHashMap<String,CoinPairBean> coinPairMap;
        /**
         * iconUrl : https://upload.wikimedia.org/wikipedia/commons/thumb/1/1b/Facebook_icon.svg/256px-Facebook_icon.svg.png
         * allowWithdraw : true
         * allowDeposit : true
         * minDepositQuantity : 0.000010000000000000
         */

        private String iconUrl;
        // 是否允许提币
        private boolean allowWithdraw;
        // 是否允许充币
        private boolean allowDeposit;
        // 最小充币数量
        private String minDepositQuantity;

        /**
         * orgId : 6001
         * customOrder : 2
         */

        private String orgId;
        private String tokenId;
        private String tokenName;
        private int addressCount;

        private boolean needAddressTag;
        private List<ChainType> chainTypes;


        private int customOrder;
        /**
         * baseTokenSymbols : [{"orgId":"6001","exchangeId":"301","symbolId":"USDTBTC","symbolName":"USDTBTC","baseTokenId":"USDT","baseTokenName":"USDT","quoteTokenId":"BTC","quoteTokenName":"BTC","basePrecision":"0.001","quotePrecision":"0.1","minTradeQuantity":"0.1","minTradeAmount":"0.1","minPricePrecision":"0.001","digitMerge":"0.1,0.01,0.001","canTrade":true,"customOrder":2,"indexRecommendOrder":0,"showStatus":true,"category":1}]
         * quoteTokenSymbols : [{"orgId":"6001","exchangeId":"301","symbolId":"BTCUSDT","symbolName":"BTCUSDT","baseTokenId":"BTC","baseTokenName":"BTC","quoteTokenId":"USDT","quoteTokenName":"USDT","basePrecision":"0.000001","quotePrecision":"0.01","minTradeQuantity":"0.000001","minTradeAmount":"0.01","minPricePrecision":"0.01","digitMerge":"1,0.1,0.01","canTrade":true,"customOrder":14,"indexRecommendOrder":6,"showStatus":false,"category":1},{"orgId":"6001","exchangeId":"301","symbolId":"ETCUSDT","symbolName":"ETCUSDT","baseTokenId":"ETC","baseTokenName":"ETC","quoteTokenId":"USDT","quoteTokenName":"USDT","basePrecision":"0.0001","quotePrecision":"0.0001","minTradeQuantity":"0.0001","minTradeAmount":"1","minPricePrecision":"0.0001","digitMerge":"0.01,0.001,0.0001","canTrade":true,"customOrder":13,"indexRecommendOrder":2,"showStatus":true,"category":1},{"orgId":"6001","exchangeId":"301","symbolId":"ATUSDT","symbolName":"ATUSDT","baseTokenId":"AT","baseTokenName":"AT","quoteTokenId":"USDT","quoteTokenName":"USDT","basePrecision":"0.01","quotePrecision":"0.01","minTradeQuantity":"1","minTradeAmount":"0.1","minPricePrecision":"0.0001","digitMerge":"0.01,0.001,0.0001","canTrade":true,"customOrder":12,"indexRecommendOrder":4,"showStatus":false,"category":1},{"orgId":"6001","exchangeId":"301","symbolId":"BHDUSDT","symbolName":"BHDUSDT","baseTokenId":"BHD","baseTokenName":"BHD","quoteTokenId":"USDT","quoteTokenName":"USDT","basePrecision":"0.0001","quotePrecision":"0.01","minTradeQuantity":"0.01","minTradeAmount":"0.1","minPricePrecision":"0.01","digitMerge":"1,0.1,0.01","canTrade":true,"customOrder":11,"indexRecommendOrder":0,"showStatus":true,"category":1},{"orgId":"6001","exchangeId":"301","symbolId":"BXXUSDT","symbolName":"BXXUSDT","baseTokenId":"BXX","baseTokenName":"BXX","quoteTokenId":"USDT","quoteTokenName":"USDT","basePrecision":"0.001","quotePrecision":"0.001","minTradeQuantity":"0.001","minTradeAmount":"0.001","minPricePrecision":"0.001","digitMerge":"0.1,0.01,0.001","canTrade":true,"customOrder":10,"indexRecommendOrder":0,"showStatus":false,"category":1},{"orgId":"6001","exchangeId":"301","symbolId":"DRINKUSDT","symbolName":"DRINKUSDT","baseTokenId":"DRINK","baseTokenName":"DRINK","quoteTokenId":"USDT","quoteTokenName":"USDT","basePrecision":"1","quotePrecision":"1","minTradeQuantity":"1","minTradeAmount":"1","minPricePrecision":"1","digitMerge":"1","canTrade":true,"customOrder":9,"indexRecommendOrder":0,"showStatus":true,"category":1},{"orgId":"6001","exchangeId":"301","symbolId":"HKDTUSDT","symbolName":"HKDTUSDT","baseTokenId":"HKDT","baseTokenName":"HKDT","quoteTokenId":"USDT","quoteTokenName":"USDT","basePrecision":"1","quotePrecision":"0.1","minTradeQuantity":"10","minTradeAmount":"1","minPricePrecision":"0.1","digitMerge":"0,0.1","canTrade":true,"customOrder":8,"indexRecommendOrder":0,"showStatus":true,"category":1},{"orgId":"6001","exchangeId":"301","symbolId":"IPCUSDT","symbolName":"IPCUSDT","baseTokenId":"IPC","baseTokenName":"IPC","quoteTokenId":"USDT","quoteTokenName":"USDT","basePrecision":"0.1","quotePrecision":"0.000001","minTradeQuantity":"0.1","minTradeAmount":"0.0001","minPricePrecision":"0.000001","digitMerge":"0.01,0.0001,0.000001","canTrade":true,"customOrder":7,"indexRecommendOrder":0,"showStatus":true,"category":1},{"orgId":"6001","exchangeId":"301","symbolId":"LMBUSDT","symbolName":"LMBUSDT","baseTokenId":"LMB","baseTokenName":"LMB","quoteTokenId":"USDT","quoteTokenName":"USDT","basePrecision":"0.01","quotePrecision":"0.01","minTradeQuantity":"0.01","minTradeAmount":"0.01","minPricePrecision":"0.01","digitMerge":"1,0.1,0.01","canTrade":true,"customOrder":6,"indexRecommendOrder":0,"showStatus":true,"category":1},{"orgId":"6001","exchangeId":"301","symbolId":"MPUSDT","symbolName":"MPUSDT","baseTokenId":"MP","baseTokenName":"MP","quoteTokenId":"USDT","quoteTokenName":"USDT","basePrecision":"1","quotePrecision":"0.0001","minTradeQuantity":"1100","minTradeAmount":"1","minPricePrecision":"0.0001","digitMerge":"0.01,0.001,0.0001","canTrade":false,"customOrder":5,"indexRecommendOrder":0,"showStatus":true,"category":1},{"orgId":"6001","exchangeId":"301","symbolId":"MUSKUSDT","symbolName":"MUSKUSDT","baseTokenId":"MUSK","baseTokenName":"MUSK","quoteTokenId":"USDT","quoteTokenName":"USDT","basePrecision":"1","quotePrecision":"0.001","minTradeQuantity":"300","minTradeAmount":"1","minPricePrecision":"0.001","digitMerge":"0.1,0.01,0.001","canTrade":true,"customOrder":4,"indexRecommendOrder":0,"showStatus":true,"category":1},{"orgId":"6001","exchangeId":"301","symbolId":"MYPUSDT","symbolName":"MYPUSDT","baseTokenId":"MYP","baseTokenName":"MYP","quoteTokenId":"USDT","quoteTokenName":"USDT","basePrecision":"1","quotePrecision":"0.1","minTradeQuantity":"1","minTradeAmount":"1","minPricePrecision":"0.1","digitMerge":"1,0.1","canTrade":false,"customOrder":3,"indexRecommendOrder":0,"showStatus":true,"category":1},{"orgId":"6001","exchangeId":"301","symbolId":"SSAUSDT","symbolName":"SSA2USDT","baseTokenId":"SSA","baseTokenName":"SSA","quoteTokenId":"USDT","quoteTokenName":"USDT","basePrecision":"0.01","quotePrecision":"0.001","minTradeQuantity":"0.01","minTradeAmount":"0.01","minPricePrecision":"0.001","digitMerge":"1,0.1,0.01","canTrade":true,"customOrder":2,"indexRecommendOrder":0,"showStatus":true,"category":1},{"orgId":"6001","exchangeId":"301","symbolId":"XXZUSDT","symbolName":"XXZUSDT","baseTokenId":"XXZ","baseTokenName":"XXZ","quoteTokenId":"USDT","quoteTokenName":"USDT","basePrecision":"1","quotePrecision":"0.0001","minTradeQuantity":"1","minTradeAmount":"1","minPricePrecision":"0.0001","digitMerge":"0.01,0.001,0.0001","canTrade":true,"customOrder":1,"indexRecommendOrder":3,"showStatus":false,"category":1}]
         * isEOS : false
         * tokenType : BTC_TOKEN
         * needKycQuantity : 0
         */

        private boolean isEOS;
        private String tokenType;
        private String needKycQuantity;
        private List<CoinPairBean> baseTokenSymbols;
        private List<CoinPairBean> quoteTokenSymbols;


        public boolean isNeedAddressTag() {
            return needAddressTag;
        }

        public void setNeedAddressTag(boolean needAddressTag) {
            this.needAddressTag = needAddressTag;
        }

        public int getAddressCount() {
            return addressCount;
        }

        public void setAddressCount(int addressCount) {
            this.addressCount = addressCount;
        }

        public String getTokenId() {
            return tokenId;
        }

        public void setTokenId(String tokenId) {
            this.tokenId = tokenId;
        }

        public String getTokenName() {
            return tokenName;
        }

        public void setTokenName(String tokenName) {
            this.tokenName = tokenName;
        }

        public String getTokenFullName() {
            return tokenFullName;
        }

        public void setTokenFullName(String tokenFullName) {
            this.tokenFullName = tokenFullName;
        }

        public String getFirstLetter() {
            return firstLetter;
        }

        public void setFirstLetter(String firstLetter) {
            this.firstLetter = firstLetter;
        }

        public LinkedHashMap<String, CoinPairBean> getCoinPairMap() {
            if (coinPairMap == null) {
                coinPairMap = new LinkedHashMap<>();
            }
            return coinPairMap;
        }

        public void setCoinPairMap(LinkedHashMap<String, CoinPairBean> coinPairMap) {
            this.coinPairMap = coinPairMap;
        }

        public String getIconUrl() {
            return iconUrl;
        }

        public void setIconUrl(String iconUrl) {
            this.iconUrl = iconUrl;
        }

        public boolean isAllowWithdraw() {
            if(UserInfo.getUserInfo() != null && UserInfo.getUserInfo().whiteConfig != null)
                return UserInfo.getUserInfo().whiteConfig.canWithdraw;
            return allowWithdraw;
        }

        public void setAllowWithdraw(boolean allowWithdraw) {
            this.allowWithdraw = allowWithdraw;
        }

        public boolean isAllowDeposit() {
            return allowDeposit;
        }

        public void setAllowDeposit(boolean allowDeposit) {
            this.allowDeposit = allowDeposit;
        }

        public String getMinDepositQuantity() {
            return minDepositQuantity;
        }

        public void setMinDepositQuantity(String minDepositQuantity) {
            this.minDepositQuantity = minDepositQuantity;
        }

        public List<CoinPairBean> getBaseTokenSymbols() {
            return baseTokenSymbols;
        }

        public void setBaseTokenSymbols(List<CoinPairBean> baseTokenSymbols) {
            this.baseTokenSymbols = baseTokenSymbols;
        }

        public String getOrgId() {
            return orgId;
        }

        public void setOrgId(String orgId) {
            this.orgId = orgId;
        }

        public int getCustomOrder() {
            return customOrder;
        }

        public void setCustomOrder(int customOrder) {
            this.customOrder = customOrder;
        }

        public List<ChainType> getChainTypes() {
            return chainTypes;
        }

        public void setChainTypes(List<ChainType> chainTypes) {
            this.chainTypes = chainTypes;
        }

        public String getTabName() {
            return tabName;
        }

        public void setTabName(String tabName) {
            this.tabName = tabName;
        }

        public boolean isIsEOS() {
            return isEOS;
        }

        public void setIsEOS(boolean isEOS) {
            this.isEOS = isEOS;
        }

        public String getTokenType() {
            return tokenType;
        }

        public void setTokenType(String tokenType) {
            this.tokenType = tokenType;
        }

        public String getNeedKycQuantity() {
            return needKycQuantity;
        }

        public void setNeedKycQuantity(String needKycQuantity) {
            this.needKycQuantity = needKycQuantity;
        }

        public List<CoinPairBean> getQuoteTokenSymbols() {
            return quoteTokenSymbols;
        }

        public void setQuoteTokenSymbols(List<CoinPairBean> quoteTokenSymbols) {
            this.quoteTokenSymbols = quoteTokenSymbols;
        }

    }
}
